home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Gamer (Italian) 30
/
PC Gamer IT CD 30 1-2.iso
/
MOTS
/
GAMEDATA
/
RESOURCE
/
JKMRES.GOO
/
cog_force_destruction.cog
< prev
next >
Wrap
Text File
|
1998-02-25
|
2KB
|
104 lines
# Jedi Knight Cog Script
#
# FORCE_DESTRUCTION.COG
#
# FORCEPOWER Script - Destruction
# Dark Side Bonus Power
# Bin 33
#
# [YB]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
symbols
thing player local
template destProj1=+force_dest_p1 local
template destProj2=+force_dest_p2 local
template destProj3=+force_dest_p3 local
template destProj4=+force_dest_p4 local
sound destSound=ForceDestruct01.wav local
flex cost=200.0 local
flex mana local
int rank local
flex autoAimFOV=10 local
int inbubble=0 local
message startup
message activated
message selected
message enterbubble
message exitbubble
end
# ========================================================================================
code
startup:
player = GetLocalPlayerThing();
inbubble = 0;
Return;
# ........................................................................................
activated:
if(inbubble) Return;
// Disallow destruction while on the EWEB.
if (GetCurWeapon(player) == 10)
{
jkPrintUNIString(player, 381); // Step off the EWEB First!
return;
}
mana = GetInv( player, 14 );
if(mana >= cost || GetInv(player, 14) >= GetInv(player, 69))
{
if(GetInv(player, 64) != 1) ChangeInv(player, 14, -cost);
// Send a "force disturbance"...
if(!IsMulti())
SendMessageExRadius(GetThingPos(player), cost, 0x4, splash, 33, 0, 0, 0);
rank = GetInv(player, 33);
AddDynamicTint(player, 0.3, 0.0, 0.15);
FireProjectile(player, destProj1[rank-1], destSound, 24, '0 0 0', '0 0 0', 1.0, 0, autoAimFOV, autoAimFOV);
SetBinWait(player, 33, 2.75);
}
Return;
# ........................................................................................
selected:
jkPrintUNIString(player, 33);
Return;
# ........................................................................................
enterbubble:
inbubble = 1;
//call stop_power;
Return;
# ........................................................................................
exitbubble:
inbubble = 0;
Return;
end